package com.steakliu.sun.demo.client.component;

import com.steakliu.sun.annotation.SunReference;
import com.steakliu.sun.demo.api.UserService;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Service;

/**
 * 功能说明：
 * <p>
 * Original @Author: steakliu-刘牌, 2023-01-14  16:16
 * <p>
 * Copyright (C)2020-2022  steakliu All rights reserved.
 */
@Service
public class UserServiceComponent {

    @SunReference(version = "1.0.0" , group = "sun", token = "123456", serializer = "jdk", registryType = "nacos",
            registryAddress = "localhost:8848",proxy = "jdk", timeout = 15000, loadBalance = "random")
    private UserService userService;

    public String getUser(String name){
        return userService.getUser(name);
    }
}
